Introduction

While typesetting languages like TEX [Knuth, 1984] and LATEX [Lamport, 1986] have facilities for making line drawings by describing them in words, the procedure is very slow and error prone, and the quality of the results can be disappointing. Such illustrations are more quickly prepared using a graphical editor.

An alternative is to prepare the whole document using a ``What You See Is What You Get'' system such as Macdraw or FrameMaker. Unfortunately these have their own limitations – typesetting mathematics in these systems is very hard, for example.

A lot of users prefer to prepare the text of documents using a typesetting language, and the figures using a graphical editor. The cut and paste operation which is then required to put the final document together is very undesirable.

In all three of these cases, the problems with incorporating figures into a document make authors reluctant to add figures when they would be helpful, and delay making corrections and changes.

I describe a system by which separate figures can be incorporated into a typeset document at the time of printing. The system permits a variety of ways of sizing the illustrations, either scaling the illustration to the space available in the text, or setting the size of the space in the text to match the original size of the figure.

Apart from illustrations created on a graphical editor, digitised photographs, processed images, screendumps, and a variety of other types of figures can be merged into a document by this system.

The main issues to be addressed by such a system are:

The problem breaks down into two parts: First, there is the problem of merging the figure description and the textual description into a single stream sent to the printer. Second, there is the problem of communicating the size and scaling information between the systems used to prepare the illustrations, and the typesetter.

Fortunately, much of the problem is solved automatically by the use of PostScript [Adobe Systems Inc., 1985] as a page description language for both the text and the illustrations. It is relatively easy to merge the PostScript streams, and the PostScript itself provides the medium for communicating the document sizes, by means of the meta comment %%BoundingBox. We shall now examine how to put the various pieces together to make a useful system.